package jmine.tec.web.wicket.component;

import jmine.tec.web.wicket.component.table.SelectEntityModel;

import org.apache.wicket.markup.html.form.Check;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.Model;

/**
 * Checkbox em formato de Panel para poder adicionar em outros lugares
 * 
 * @author takeshi
 */
public class InlinedCheck extends Panel {

    private final Check<SelectEntityModel> check;

    /**
     * C'tor
     * 
     * @param id String
     * @param model IModel
     * @param group {@link CheckGroup}
     */
    @SuppressWarnings("unchecked")
    public InlinedCheck(String id, SelectEntityModel model, CheckGroup group) {
        super(id);
        this.check = new Check("checkBox", new Model<SelectEntityModel>(model), group);
        this.add(this.check);
    }

    /**
     * @return the {@link Check}
     */
    public Check<SelectEntityModel> getCheck() {
        return this.check;
    }
}
